import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/ruoyi";

export function subOrder(query) {
  return request({
    url: 'ganxin/order/buyGoods',
    method: 'post',
    data: query
  })
}
// 获取购买物品订单
export function getBuy(data) {
  return request({
    url: '/ganxin/order/buyList',
    method: 'get',
    params: data
  })
}

// 获取卖出商品订单
export function getSell(data) {
  return request({
    url: '/ganxin/order/sellList',
    method: 'get',
    params: data
  })
}

export function getStatisticsPay(){
  return request({
    url: '/ganxin/order/statistics',
    method: 'get'
  })
}

export function getStatisticsGoods(){
  return request({
    url: '/ganxin/order/statisticsGoods',
    method: 'get'
  })
}

//确认收货  /ganxin/order/confirm/10000
export function confirmGoods(orderId) {
  return request({
    url: '/ganxin/order/confirm/'+ praseStrEmpty(orderId),
    method: 'get'
  })
}

